package com.tbvtc.agriculturalcreditchainserver2025.utils;

import java.util.Random;

public class CodeUtil {


    public static String getRandomCode  (Integer length) {
        StringBuffer sb = new StringBuffer();
        Random r = new Random();
        for (Integer i = 0; i < length; i++) {
            sb.append(r.nextInt(10));
        }
                        return sb.toString();

    }


}
